<div class="menu">
	<div class="head">Menu</div>
	<?php
	//echo Yii::app()->controller->id;
	$this->widget('zii.widgets.CMenu', array(
			'items'=>array(
					array(	'label'=>'Home2',
							'url'=>array(''),
							'active'=>Yii::app()->controller->id == '',
							'visible'=>!UserLoginUtil::isLogin(),
					),
					array(	'label'=>'Home',
							'url'=>array('management/'),
							'active'=>Yii::app()->controller->id == 'management',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "STAFF", "USER")),
					),	
					array(	'label'=>'Master Data',
							'url'=>'javascript:void(0)',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_ADMIN_REPORT", "VIEW_USER_REPORT")),
							'active'=>(Yii::app()->controller->id == 'equipmentType') || (Yii::app()->controller->id == 'role'),
							'items'=>array(
									array(	'label'=>'Role',
											'url'=>array('Role/'),
											'active'=>Yii::app()->controller->id == 'role',
											'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_ROLE", "UPDATE_ROLE", "ADD_ROLE", "DELETE_ROLE")),
							),
							array(	'label'=>'Equipment Type',
							'url'=>array('EquipmentType/'),
							'active'=>Yii::app()->controller->id == 'equipmentType',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_EQUIPMENT_TYPE", "UPDATE_EQUIPMENT_TYPE", "ADD_EQUIPMENT_TYPE", "DELETE_EQUIPMENT_TYPE")),
							),
							)),
							array(	'label'=>'User',
							'url'=>array('User/'),
							'active'=>Yii::app()->controller->id == 'user',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_USER", "UPDATE_USER", "ADD_USER", "DELETE_USER")),
							),
							array(	'label'=>'Equipment',
							'url'=>array('Equipment/'),
							'active'=>Yii::app()->controller->id == 'equipment',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_EQUIPMENT", "UPDATE_EQUIPMENT", "ADD_EQUIPMENT", "DELETE_EQUIPMENT")),
							),
							array(	'label'=>'Room',
							'url'=>array('Room/'),
							'active'=>Yii::app()->controller->id == 'room',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_ROOM", "UPDATE_ROOM", "ADD_ROOM", "DELETE_ROOM")),
							),
							array(	'label'=>'Semester',
							'url'=>array('Semester/'),
							'active'=>Yii::app()->controller->id == 'semester',
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_SEMESTER", "UPDATE_SEMESTER", "ADD_SEMESTER", "DELETE_SEMESTER")),
							),
							array(	'label'=>'Report', 'url'=>array('report/Report'),
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_ADMIN_REPORT", "VIEW_USER_REPORT")),
							'items'=>array(
							array(	'label'=>'Admin',
							'url'=>array('report/Report', 'tag'=>'new'),
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_ADMIN_REPORT")),
							),
							array(	'label'=>'User / Head of User',
							'url'=>array('admin/Report', 'tag'=>'popular'),
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_USER_REPORT")),
							),
							)),
							array(	'label'=>'Other',
							'url'=>array('management/Other'),
							'visible'=>UserLoginUtil::hasPermission(array("FULL_ADMIN", "VIEW_OTHER")),
							),
							array(	'label'=>'Login',
							'url'=>array('management/Login'),
							'visible'=>!UserLoginUtil::isLogin(),
							),
							array(	'label'=>'Logout',
							'url'=>array('management/Logout'),
							'visible'=>UserLoginUtil::isLogin(),
							),

			),
	));

	?>
</div>
